<template>
    <div>

        <input v-model="value" />   
        <!-- 这里的value是绑定computed计算属性的value -->
        <input v-model="why" />
        <!-- 这里的why是绑定computed计算属性的why -->
    </div>
</template>

<script>
export default {
    props: {
        modelValue: {
            type: String,
        },
        title:{
            type: String
        }
    },
    emits: ["update:modelValue","update:title"],
    computed: {
        value: {
            get() {
                return this.modelValue
            },
            set(value) {
                this.$emit("update:modelValue", value)
            }
        },
        why: {
            get() {
                return this.title
            },
            set(why) {
                this.$emit("update:title", why)
            }
        },
    },

}
</script>

<style lang="scss" scoped>
</style>